// components/epsoide/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    index:{
      type: Number,
        observer: function(newVal, oldVal, changedPath) {
           var val = newVal > 10? newVal : '0'+ newVal
            this.setData({
                _index: val
            })
        }
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
      months: [
          '一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月',
      ],
      _index: '',
      month: '七月',
      year: 2018
  },

  attached () {
    let data = new Date()
      let year = data.getFullYear()
      let month = data.getMonth()

    this.setData({
        year: year,
        month: this.data.months[month]
    })
  },
  /**
   * 组件的方法列表
   */
  methods: {

  }
})
